package com.freedy.concurrent.OptimisticLock;

import lombok.Data;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.concurrent.atomic.LongAdder;


/**
 * @author Freedy
 * @date 2021/4/24 10:02
 */
public class AtomicFieldUpdaterTest {
    public static void main(String[] args) throws Exception {
        Student student = new Student();
//        student.setName("张三");
//        AtomicReferenceFieldUpdater<Student, String> name = AtomicReferenceFieldUpdater.newUpdater(Student.class, String.class, "name");
//        name.compareAndSet(student,"三","李四");
//        System.out.println(name.get(student));
        System.out.println(12<<1);
    }
}
@Data
class Student{
    volatile String name;
}
